package com.justnow.offer;

import jdk.nashorn.internal.runtime.linker.LinkerCallSite;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Scanner;

/**
 * @author justnow
 * Created on 2020-09-06
 * Description
 */
public class TencentSolution01 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int length1 = scanner.nextInt();
        HashMap<Integer, Integer> set1 = new HashMap<>();
        for (int i = 0; i < length1; i++) {
            set1.add(scanner.nextInt());
        }

        int length2 = scanner.nextInt();
        HashSet<Integer> set2 = new HashSet<>();
        for (int i = 0; i < length2; i++) {
            set2.add(scanner.nextInt());
        }

        for (int i = 0; i < length1; i++) {
            if (set2.contains())
        }


/*
        Scanner scanner = new Scanner(System.in);
        int length1 = scanner.nextInt();
        ListNode head1 = new ListNode(-1);
        ListNode current1 = head1;
        for (int i = 0; i < length1; i++) {
            ListNode temp1 = new ListNode(scanner.nextInt());
            current1.next = temp1;
            current1 = current1.next;
        }

        int length2 = scanner.nextInt();
        ListNode head2 = new ListNode(-1);
        ListNode current2 = head2;
        for (int i = 0; i < length2; i++) {
            ListNode temp2 = new ListNode(scanner.nextInt());
            current2.next = temp2;
            current2 = current2.next;
        }

        while (head1.next != null && head2.next != null) {
            if (head1.next.val < head2.next.val) {

            }
        }
*/

    }
}

class ListNode {
    int val;
    ListNode next;
    public ListNode(int val) {
        this.val = val;
    }
}